<template>
  <div class='manage-issues'>
    <p class="title">{{title}} <el-button v-for="(item,index) in btnsData" :key="index" :type="item.type" class="btn-add fr" @click="item.click">{{item.label}}</el-button></p>
    <div class="table-box">
      <Table :modelData="modelData" :listData="listData" :pageInfo="pageInfo"></Table>
    </div>
  </div>
</template>
<script>
import Table from '../../components/table'
export default {
  components: {Table},
  name: "",
  data() {
    return {
      title:"议题管理",
      btnsData:[
        {label:"新增",type:'primary',click:this.add}
      ],
      modelData:[
        {myType:'index',label:"序号"},
        {myType:'normal',prop:"",label:'议题名称'},
        {myType:'operate',label:'管理',btns:[
          {label:'编辑',click:this.edit,icon:require('../../assets/images/manageHome/edit.png')},
          {label:'删除',click:this.delete,icon:require('../../assets/images/manageIssues/delete.png')}
        ],width:"200"}
      ],
      listData:[{}],
      pageInfo:{
        page:1,
        total:10,
        size:10,
        changePage:this.changePage
      }
    };
  },
  methods: {
    // 新增
    add(){
      this.$store.state.add.show=true
    },
    edit(scope){

      this.add()
    },
    // 删除
    delete(scope){
      this.$store.state.confirmInfo.message="是否确认删除？"
      this.$store.state.confirmInfo.show=true
    },

    // 翻页
    changePage(){

    }
  },
  created() {}
};
</script>
<style lang="scss" scoped>
.manage-issues {
  width: 100%;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  overflow: auto;

  .title{
    font-weight: 600;
    font-size: 20px;
    background-color: #fff;
    text-indent: 20px;
    height: 60px;
    line-height: 60px;
    box-sizing: border-box;
    border-bottom: 1px solid #ebeef5;
    
  }
  .table-box{
    height: calc(100% - 60px);
  }
}
</style>